﻿using Reflector.CodeModel;

namespace CallGraphExtractor
{
    public static class ExtensionOfIMemberReference
    {
        public static MemberKind GetMemberKind(this IMemberReference mr)
        {
            if (mr is IMethodReference)
                return MemberKind.Method;
            else if (mr is IFieldReference)
                return MemberKind.Field;
            else if (mr is IEventReference)
                return MemberKind.Event;
            else if (mr is IPropertyReference)
                return MemberKind.Property;
            else
                return MemberKind.Unknown;
        }
    }
}
